package se.webbzon.boltzmann.game.sequence.builder.dialogue;

import se.webbzon.boltzmann.game.object.dialogue.layout.DialogueLayout;
import se.webbzon.boltzmann.game.sequence.builder.AbstractSequenceRow;
import se.webbzon.boltzmann.game.sequence.builder.AbstractSequenceRowInflator;
import se.webbzon.boltzmann.game.sequence.builder.SequenceRowInflatorBody;

public abstract class AbstractDialogueRowInflator extends AbstractSequenceRowInflator {

	// The layout associated with this abstract dialogue row inflator
	private final DialogueLayout layout;
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new abstract dialogue row inflator with the given name. **/
	public AbstractDialogueRowInflator(String factoryName, DialogueLayout layout) {
		super(factoryName);
		this.layout = layout;
	}

	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the provided dialogue layout for this dialogue row inflator. **/
	public DialogueLayout getLayout() {
		return layout;
	}
	
	@Override public AbstractSequenceRow makeNew(SequenceRowInflatorBody body) {
		return ((AbstractDialogueRowDeflation) body.getDeflation()).makeRow(body.getSequenceBuilder(),layout);
	}
	
	

}
